package com.softeem.springboot01.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.softeem.springboot01.dto.Result;
import com.softeem.springboot01.entity.User;
import com.softeem.springboot01.mapper.UserMapper;
import com.softeem.springboot01.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Objects;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/login")
    public Result login(String username, String password){
        return userService.login(username,password);
    }

    @RequestMapping("/reg")
    public Result reg(String username,String password){
        return userService.reg(username, password);
    }

}
